package com.ustb.springboot.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ustb.springboot.common.utils.R;
import com.ustb.springboot.entity.FormEntity;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

/**
 * 表单相关操作
 *
 * @author pyn
 * @email 1661829453@qq.com
 * @date 2022-05-02 20:58:29
 */
public interface FormService extends IService<FormEntity> {


    //修改表单状态
    R editFormStatus(Map<String, Object> body);

    //显示原始表单
    R showForm(HttpServletRequest request, Map<String, Object> body);

    //提交表单填写情况
    R submitForm(HttpServletRequest request, Map<String, Object> body);

    //根据id删除表单
    R deleteFormById(Map<String, Object> body);

    //查询作答结果
    R checkResult(Map<String, Object> body);

    //保存自定义表单
    R saveForm(HttpServletRequest request, Map<String, Object> body);

    //查询自己创建的表单
    R queryFormList(HttpServletRequest request, Map<String, Object> body);

    //查询一个表单的所有填写结果
    Map<String, Object> QueryFormResult(HttpServletRequest request, Map<String,Object>body);
    //通过id查询
    List<FormEntity> querywithId(String Id);
    //表单统计
    Map<String,Object> summerizeForm (String FormId);

    R saveWork(HttpServletRequest request , Map<String , Object> body);

    List<FormEntity> queryWithdepartmentId(Map<String, Object> body);
}

